package com.nega.modules.service.impl;

import com.nega.commons.model.SearchResult;
import com.nega.modules.mapper.SearchResultMapper;
import com.nega.modules.service.SearchResultService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: Garcia
 * @CreateDate: 2019/06/04 01:08
 * @Description: what it is class?
 */

@Service
@Slf4j
public class SearchResultServiceImpl implements SearchResultService {

    @Resource
    private SearchResultMapper searchResultMapper;

    @Override
    public void insert(List<SearchResult> data) {
        searchResultMapper.insert(data);
    }

    @Override
    public List<SearchResult> getListByText(String text) {
        return searchResultMapper.getListByText(text);
    }

    @Override
    public void deleteByDate(String date) {
        searchResultMapper.deleteByDate(date);
    }
}
